package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 设备类型实体类
 * 
 * @author mark
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("app_device_category")
@Schema(name = "AppDeviceCategory", description = "设备类型表")
public class AppDeviceCategory {

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "设备类型ID")
    @TableField("device_type_id")
    private Integer deviceTypeId;

    @Schema(description = "老人id")
    @TableField("app_user_id")
    private Long appUserId;

    @Schema(description = "设备类型")
    @TableField("device_name")
    private String deviceName;

    @Schema(description = "排序值")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    @Schema(description = "删除")
    @TableField("del")
    private Integer del;
}
